'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
    const { router, controller } = app;

    app.beforeStart(async() => {
        // await app.model.sync({ alter: true }); //force  false 为不覆盖 true会删除再创建; alter true可以 添加或删除字段;
    });
    router.post('/user/login', controller.user.show);
    router.get('/user/list', controller.user.getlist);


    router.post('/test/post', controller.index.index);
    

    router.get('/comment/list', controller.comment.index);
    router.post('/comment/add', controller.comment.show);

    
    
};